package com.echo.util.impl;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Map;

public interface JavaSmsApi {

	/**
	 * 获取用户信息apikey值
	 * 
	 * @param apikey
	 * @return
	 * @throws IOException
	 * @throws URISyntaxException
	 */
	public String getUserInfo(String apikey) throws IOException, URISyntaxException;

	/**
	 * 根据apikey值向目标手机发送文本
	 * 
	 * @param apikey
	 * @param text
	 * @param mobile
	 * @return
	 * @throws IOException
	 */
	public String sendSms(String text, String mobile) throws IOException;

	/**
	 * 通过模板发送短信
	 * 
	 * @param apikey
	 * @param tpl_id
	 * @param tpl_value
	 * @param mobile
	 * @return
	 * @throws IOException
	 */
	public String tplSendSms(long tpl_id, String tpl_value, String mobile) throws IOException;

	/**
	 * 通过语音发送验证码
	 * 
	 * @param apikey
	 * @param mobile
	 * @param code
	 * @return
	 */
	public String sendVoice(String mobile, String code);

	/**
	 * 通过接口绑定主被叫号码
	 * 
	 * @param apikey
	 * @param from
	 * @param to
	 * @param duration
	 * @return
	 */
	public String bindCall(String from, String to, Integer duration);

	/**
	 * 通过接口解绑绑定主被叫号码
	 * 
	 * @param apikey
	 * @param from
	 * @param to
	 * @return
	 */
	public String unbindCall(String from, String to);

	/**
	 * 基于HttpClient 4.3的通用POST方法
	 * 
	 * @param url
	 * @param paramsMap
	 * @return
	 */
	public String post(String url, Map<String, String> paramsMap);

}
